package top.guinguo.analyzer_03.util;

import java.util.HashMap;
import java.util.Map;

/**
 * 简单同义词引擎，使用Map保存同义词
 * Created by guin_guo on 2016/12/22.
 */
public class SimpleSameWordContext implements SameWordContext {

    private Map<String, String[]> sames = new HashMap<String, String[]>();

    public SimpleSameWordContext() {
        sames.put("中国", new String[]{"大陆", "天朝"});
        sames.put("我", new String[]{"俺", "咱"});
    }

    public String[] getSameWord(String name) {
        return sames.get(name);
    }

}
